import pygame
from pygame.locals import *

pygame.init()
size = [400, 600]
screen = pygame.display.set_mode(size)
pygame.display.set_caption('000000')
background_color = (0,0,0)
rect_color = (255,0,255)
rect_size = (100,100)
rect_position = (10,10)

done = True
while done:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = False
        elif event.type == pygame.KEYUP and event.key ==K_a:
        # elif event.key == K_a:
                print("...........")
                screen.fill(background_color)
                pygame.draw.rect(screen, rect_color, [rect_position[0], rect_position[1], rect_size[0], rect_size[1]])
                pygame.display.flip()
pygame.quit()